<?php 
	defined('IN_ADMIN') or exit('No permission resources.');
?>
<link href="<?php echo CSS_PATH ?>video_store.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 9]><link href="<?php echo CSS_PATH ?>ielt9.css" rel="stylesheet" type="text/css" /><![endif]-->
<script type="text/javascript" src="<?php echo JS_PATH ?>jquery.min.js"></script>
<script type="text/javascript" src="<?php echo JS_PATH ?>video/swfobject.js"></script>
<script type="text/javascript" src="<?php echo JS_PATH ?>video/swfobject2.js"></script>
<input type="hidden" name="video_url" id="video_url" value="">
<div class="m_box">
	<div class="clr h_box">
		<ul class="clr">
			<li><a href="#" title="#ct1" class="ac">从视频库选择</a></li>
		</ul>
	</div>
    <div class="clr ct" id="ct1">
    	<div class="l">
        	<div class="r1">
           	  <form action="" method="get">
                	<label style="font-size: 12px;" title="本站上传视频">原创<input type="checkbox" id="userupload" name="userupload" title="本站上传视频"></label> <input name="subject" id="subject_s" type="text" class="s_ipt"/><input type="button" id="search" value="搜索" class="s_btn" onclick="get_videoes(1);"/>
                </form>
          </div>
        	<div class="r2">
            	<ul class="clr col3" id="ulic">
				<?php 
				if(is_array($infos)){
					foreach($infos as $info){

				?>  
				
                    <li><div class="w9"><a href="javascript:void(0);" title="<?php echo $info['subject'] ?>" data-id="<?php echo $info['id'] ?>" data-tags="<?php echo $info['tags'] ?>" data-content="<?php echo $info['content'] ?>"  data-player="<?php echo $info['player'] ?>" onclick="a_click(this);"><span></span><img src="<?php echo $info['cover'] ?>" width="90" height="51" /></a><p><?php echo str_cut($info['subject'], 18) ?></p></div></li>
				
				
				<?php 
					}
				}else{
				?>
					&nbsp;&nbsp;&nbsp;&nbsp;56视频库中没有您的视频，请先上传视频！
				<?php 
					}
				?>
                </ul>
            </div>
        	<div class="r3">
            	<div class="ipages">
                	<?php  echo $pages ?>
                </div>
            </div>
        </div>
    	<div class="r" id="video_view"><img src="<?php echo IMG_PATH ?>spyl.jpg" width="300" height="225" /></div>
		

    </div>
</div>
<script type="text/javascript">
	
function get_videoes(page) {
			var subject = $('#subject_s').val();
			var userupload = 0;
			if ($('#userupload').attr('checked')=='checked') {
				userupload = 1;
			}
			$.get('index.php', {m:'iappVideo', c:'video_select', a:'search', subject:subject, page:page, userupload:userupload,pc_hash:'<?php echo $_SESSION['pc_hash'];?>' }, function(data){
				var obj = eval('(' + data + ')');
				$('.ipages').html(obj.pages);
				$('#ulic').html(obj.html);
			});
		}
window.top.$('#relation').val(relation_ids);


function a_click(obj) {
	var player = $(obj).attr('data-player');
	$("#ulic div.w9 a").removeClass("ac");
	$(obj).addClass("ac");
	var rstr = $(obj).attr('data-id')+"|"+$(obj).attr('title')+"|"+$(obj).attr('data-tags')+"|"+$(obj).attr('data-content');
	$('#video_url').val(rstr);
	var html = "<embed src='"+player+"' type='application/x-shockwave-flash' allowFullScreen='true' width='300' height='225' allowNetworking='all' wmode='opaque' allowScriptAccess='always'></embed>";
	$('#video_view').html(html);
}

</script>


</body>
</html>